package view.Administrateur;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;

@SuppressWarnings("serial")
public class CenterPanel extends JPanel {

	private JButton bAdd;

	public CenterPanel() {

		// Ajout de la transparence
		this.setOpaque(false);

		// Agencement des conteneurs
		GridBagConstraints constraint = new GridBagConstraints();
		this.setLayout(new GridBagLayout());


		// CONTRAINTE DU BOUTON AUJOUTER PLUGIN

		bAdd = new JButton("Ajouter plugin");

		constraint.gridx = 1;
		constraint.gridy = 0;

		constraint.weightx = GridBagConstraints.NONE;
		constraint.weighty = GridBagConstraints.NONE;

		constraint.gridwidth = 1;
		constraint.gridheight = 1;

		constraint.fill = GridBagConstraints.BOTH;

		this.add(bAdd, constraint);


		// CONTRAINTE DU CHAMP DE TEXTE

		JTextField text = new JTextField();

		constraint.gridx = 2;

		constraint.weightx = 0.9;

		constraint.gridwidth = 9;

		this.add(text, constraint);

		// FIN DES CONTRAINTES

	}

}
